<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	template="/templates/mainTemplate.xhtml">

	<ui:define name="windowTitle">
            #{msgs.loginTitle}
         </ui:define>
	<ui:define id="noteDetails" name="content">


		<h:form>
			<rich:panel>
				<h2 style="text-align: center">Szczegóły notatki -
					#{noteBean.note.name}</h2>

				<h:panelGrid columns="2"
					style="font-size: 14px; font-style: oblique; background: #ADD8E9; bottom-margin: 10px; width:100%">
					<h:outputLabel styleClass="textStyle" value="Właściciel notatki:" />
					<h:inputTextarea
						style="resize: none; font-size: 14px; font-style:oblique"
						id="taskOwner" cols="75" readonly="true"
						value="#{noteBean.note.owner.firstName} #{noteBean.note.owner.lastName}" />

				</h:panelGrid>

				<h:panelGrid columns="2"
					style="font-size: 14px; font-style: oblique; background: #ADD8E9; bottom-margin: 10px; width:100%">
					<h:outputLabel styleClass="textStyle" value="Opis kontekstu:" />
					<h:inputTextarea
						style="resize: none; font-size: 14px; font-style:oblique"
						id="noteDesc" rows="5" cols="75" readonly="true"
						value="#{noteBean.note.description}" />

				</h:panelGrid>
				<h:panelGrid columns="2"
					style="font-size: 14px; font-style: oblique; background: #ADD8E9; bottom-margin: 10px; width:100%">
					<h:outputLabel styleClass="textStyle" value="Data stworzenia:" />
					<h:inputTextarea
						style="resize: none; font-size: 14px; font-style:oblique"
						id="noteDate" cols="75" readonly="true"
						value="#{noteBean.note.startDate}" />

				</h:panelGrid>


				<rich:dataTable
					onRowMouseOver="this.style.backgroundColor='#F1F1F1'"
					onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'"
					cellpadding="0" cellspacing="0" width="700" border="0"
					id="userList" style="width : 100%" styleClass="tableStyle"
					rowClasses="oddRow,evenRow" headerClass="tableHeader"
					value="#{noteBean.noteAttachmentsList}" var="noteAttachItem">
					<f:facet name="header">
						<rich:column>
							<h:outputText styleClass="textStyle" value="Załączniki" />

						</rich:column>
						<rich:columnGroup>
							<rich:column>
								<h:outputText styleClass="headerText" value="Nazwa" />
							</rich:column>
						</rich:columnGroup>
					</f:facet>
					<rich:column>
						<h:commandLink action="#{fileDownloadBean.saveNoteFile(noteAttachItem)}"
							value="#{noteAttachItem.fileName}" />
					</rich:column>
				</rich:dataTable>
			</rich:panel>

		</h:form>
	</ui:define>

</ui:composition>